import {defaultRequest} from "@/network";

export function queryForPage(queryPage) {
  return defaultRequest({
    method: "POST",
    data: queryPage,
    url: "/article/page"
  });
}

export function findById(id) {
  return defaultRequest({
    method: "GET",
    url: "/article/get/" + id
  });
}

export function deleteById(id) {
  return defaultRequest({
    method: "POST",
    params: {id},
    url: "/article/delete"
  });
}

export function saveOrUpdate(article) {
  return defaultRequest({
    method: "POST",
    data: article,
    url: "/article/save"
  });
}
